#!/usr/bin/env python3
# -*- coding: utf-8 -*-
#
"""
# 1、使用for循环输入 1 2 3 4 5 6 8 9 10
for i in range(1, 10):
    print(i, end="\t")

# 2、求1-100的所有数的和
count_num = 0
for num in range(1, 101):
    count_num += num
print(count_num)

# 3、输出 1-100 内的所有奇数
count_num = 0
for num in range(1, 101):
    if num % 2 == 1:
        count_num += num
print(count_num)

# 4、输出 1-100 内的所有偶数
count_num = 0
for num in range(1, 101):
    if num % 2 == 0:
        count_num += num
print(count_num)

# 5、求1-2+3-4+5 ... 99的所有数的和
count_num = 0
for num in range(1, 101):
    count_num = count_num - num if num % 2 == 0 else count_num + num
print(count_num)

# 九九乘法表
num = 0
while num <= 9:
    for i in range(0, num):
        print("{} * {} = {}".format(i+1, num, (i+1) * num), end="\t")
    print()
    num += 1
"""
